:root {
	/* Dark theme (default) */
	--background: #000;
	--surface: #111;
	--surface-secondary: #181818;
	--surface-hover: #222;
	--border: #333;
	--text-primary: #fff;
	--text-secondary: #ccc;
	--text-tertiary: #999;
	--text-quaternary: #666;
	--text-danger: #f55;
	--button-bg: #222;
	--button-border: #444;
	--button-hover-bg: #333;
	--button-hover-border: #666;
	--button-danger-bg: #222;
	--button-danger-border: #600;
	--button-danger-color: #f66;
	--button-danger-hover-bg: #300;
	--button-danger-hover-border: #900;
	--feedback-success-border: #363;
	--feedback-error-border: #633;
	--focus-ring: rgba(255, 255, 255, 0.5);
	--shadow: rgba(0, 0, 0, 0.3);
	--range-track-bg: #333;
	--range-thumb-bg: #888;
	--range-thumb-hover-bg: #aaa;
	--range-thumb-active-bg: #ccc;
}

@media (prefers-color-scheme: light) {
	:root {
		/* Light theme */
		--background: #fafafa;
		--surface: #fff;
		--surface-secondary: #f5f5f5;
		--surface-hover: #f0f0f0;
		--border: #eaeaea;
		--text-primary: #000;
		--text-secondary: #333;
		--text-tertiary: #666;
		--text-quaternary: #999;
		--text-danger: #e00;
		--button-bg: #fff;
		--button-border: #eaeaea;
		--button-hover-bg: #f5f5f5;
		--button-hover-border: #999;
		--button-danger-bg: #fff;
		--button-danger-border: #fee;
		--button-danger-color: #e00;
		--button-danger-hover-bg: #fee;
		--button-danger-hover-border: #faa;
		--feedback-success-border: #afa;
		--feedback-error-border: #faa;
		--focus-ring: rgba(0, 0, 0, 0.2);
		--shadow: rgba(0, 0, 0, 0.1);
		--range-track-bg: #ddd;
		--range-thumb-bg: #666;
		--range-thumb-hover-bg: #444;
		--range-thumb-active-bg: #222;
	}
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
		"Helvetica Neue", sans-serif;
	margin: 0;
	padding: 24px;
	background-color: var(--background);
	color: var(--text-primary);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.container {
	max-width: 600px;
	margin: 0 auto;
	background-color: var(--surface);
	padding: 24px;
	border-radius: 8px;
	box-shadow: 0 2px 10px var(--shadow);
}

h1 {
	color: var(--text-primary);
	margin-top: 0;
	margin-bottom: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	font-size: 20px;
}

.option-group {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.option-group:last-child {
	border-bottom: none;
}

label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text-secondary);
	font-size: 14px;
}

select,
input {
	width: 100%;
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: 5px;
	margin-bottom: 10px;
	background-color: var(--surface);
	color: var(--text-primary);
	font-size: 14px;
	transition: border-color 0.15s ease;
	box-sizing: border-box;
}

select:last-child,
input:last-child {
	margin-bottom: 0;
}

select:focus,
input:focus {
	outline: none;
	border-color: var(--text-tertiary);
	box-shadow: 0 0 0 2px var(--focus-ring);
}

input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	background-color: var(--range-track-bg);
	border-radius: 4px;
	border: none;
	outline: none;
	padding: 0;
	margin: 0 0 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--range-thumb-bg);
	cursor: pointer;
	transition: background-color 0.15s ease;
	border: none;
}

input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--range-thumb-bg);
	cursor: pointer;
	transition: background-color 0.15s ease;
	border: none;
}

input[type="range"]::-webkit-slider-thumb:hover {
	background-color: var(--range-thumb-hover-bg);
}

input[type="range"]::-moz-range-thumb:hover {
	background-color: var(--range-thumb-hover-bg);
}

input[type="range"]:active::-webkit-slider-thumb {
	background-color: var(--range-thumb-active-bg);
}

input[type="range"]:active::-moz-range-thumb {
	background-color: var(--range-thumb-active-bg);
}

input[type="range"]:focus {
	box-shadow: 0 0 0 2px var(--focus-ring);
}

.range-value {
	display: inline-block;
	width: 40px;
	text-align: right;
	color: var(--text-tertiary);
}

.buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	position: sticky;
	bottom: 0;
	margin-top: 20px;
}

button {
	padding: 8px 16px;
	background-color: var(--button-bg);
	color: var(--text-primary);
	border: 1px solid var(--button-border);
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.15s ease;
	font-size: 14px;
	font-weight: 500;
	flex-shrink: 0;
}

button:hover {
	background-color: var(--button-hover-bg);
	border-color: var(--button-hover-border);
}

button:focus {
	outline: none;
	box-shadow: 0 0 0 2px var(--focus-ring);
}

button#reset {
	background-color: var(--button-danger-bg);
	border: 1px solid var(--button-danger-border);
	color: var(--button-danger-color);
}

button#reset:hover {
	background-color: var(--button-danger-hover-bg);
	border-color: var(--button-danger-hover-border);
}

.feedback-message {
	display: none;
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--text-primary);
	padding: 12px 20px;
	border-radius: 5px;
	text-align: center;
	transition: all 0.3s ease;
	z-index: 1000;
	box-shadow: 0 2px 10px var(--shadow);
	max-width: 80%;
	font-size: 14px;
	background-color: var(--surface);
}

.feedback-message.success {
	border: 1px solid var(--feedback-success-border);
}

.feedback-message.error {
	border: 1px solid var(--feedback-error-border);
}

.position-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}

.position-option {
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 12px;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s ease;
	background-color: var(--surface-secondary);
}

.position-option:hover {
	background-color: var(--surface-hover);
	border-color: var(--text-quaternary);
}

.position-option.selected {
	background-color: var(--surface-hover);
	border-color: var(--text-tertiary);
}

.position-option-icon {
	font-size: 24px;
	margin-bottom: 8px;
	color: var(--text-tertiary);
}

.radio-group {
	display: flex;
	gap: 20px;
	margin-bottom: 16px;
}

.radio-option {
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
}

.radio-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.radio-option label {
	font-weight: normal;
	margin-bottom: 0;
	padding-left: 28px;
	cursor: pointer;
	display: inline-block;
	font-size: 14px;
	position: relative;
}

.radio-option label:before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background-color: var(--surface);
	transition: all 0.15s ease;
}

.radio-option label:after {
	content: "";
	position: absolute;
	left: 5px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--text-primary);
	opacity: 0;
	transition: all 0.15s ease;
}

.radio-option input[type="radio"]:checked + label:before {
	border-color: var(--text-primary);
}

.radio-option input[type="radio"]:checked + label:after {
	opacity: 1;
}

.radio-option input[type="radio"]:focus + label:before {
	box-shadow: 0 0 0 2px var(--focus-ring);
}

.radio-option:hover label:before {
	border-color: var(--text-tertiary);
}

.domain-list {
	max-height: 200px;
	overflow-y: auto;
	margin-bottom: 16px;
	border: 1px solid var(--border);
	border-radius: 5px;
	background-color: var(--surface-secondary);
}

.domain-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border);
}

.domain-item:last-child {
	border-bottom: none;
}

.domain-name {
	flex: 1;
	font-size: 14px;
	color: var(--text-secondary);
}

.remove-domain {
	background: none;
	border: none;
	color: var(--text-danger);
	cursor: pointer;
	font-size: 18px;
	padding: 0 5px;
}

.empty-message {
	padding: 16px;
	text-align: center;
	color: var(--text-quaternary);
	font-style: italic;
	font-size: 14px;
}

.add-domain-form {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.add-domain-form input {
	flex: 1;
	padding: 10px;
	margin-bottom: 0;
	border: 1px solid var(--border);
	border-radius: 5px;
	background-color: var(--surface);
	color: var(--text-primary);
}

/* Additional styles for the options page */
.scrollToExt-container {
	position: fixed;
	z-index: 9999;
}

/* Override some styles for the options page */
body .scrollToExt-button {
	opacity: var(--current-opacity, 0.5) !important;
}

body .scrollToExt-button:hover {
	opacity: var(--current-hover-opacity, 1) !important;
}

/* About section */
.about-section {
	background-color: var(--surface-secondary);
	border-radius: 8px;
	padding: 15px;
	margin-top: 10px;
	border: 1px solid var(--border);
	text-align: center;
}

.about-section p {
	margin: 8px 0;
	line-height: 1.5;
	color: var(--text-secondary);
	font-size: 14px;
}

.about-section a {
	color: var(--text-tertiary);
	text-decoration: none;
}

.about-section a:hover {
	text-decoration: underline;
	color: var(--text-primary);
}
